package relationalQuery

import (
	"context"
	"gf-example/internal/service"

	"gf-example/api/relationalQuery/v1"
)

func (c *ControllerV1) HasToMany(ctx context.Context, req *v1.HasToManyReq) (res *v1.HasToManyRes, err error) {
	many, errs := service.HasToMany().FindByHasToMany(ctx)
	if errs != nil {
		return nil, errs
	}

	return many, nil
}
